// ActionScript file
package{
	import flash.display.*;
	import flash.events.*;
	import flash.net.URLRequest;
	import flash.display.Loader;
	import flash.utils.*;
	import flash.text.TextField;
	
	public class Object_instansiator extends MovieClip {
		
		public var objLoader:Loader;
		public var il:Number;
		public var objData:Object;
		
		private var	nodeSpace:Number;
		private var nodeWsum:Number;		
		private var titleField:TextField = new TextField();
		
		
		public function Object_instansiator(objData:Object, objPos_x:Number, stWidth:Number) {
			
			var _tWidth:Number = titleField.width; 
			/* nodeSpace = nodeWsum/(x+1);
			nodeWsum = (_x*_tWidth) + nodeSpace(x+1); */
			
			//trace(ill); 
			 /* trace(this.titleField.width);  */
			this.objData = objData;
			this.titleField.x = /* (nodeWsum + nodeSpace)*_x */objPos_x*200;
			this.titleField.y = 200;
			this.objLoader = new Loader();
			titleField.text = this.objData.title;
			/* nodeWsum = stage.stageWidth/(il.length/field.textWidth);
			nodeSpace = nodeWsum/(il+1); */
			//this.field.x = this.field.x + 200;
			//this.field.y = this.titleField.y;
			this.addChild(this.titleField);			
			//this.titleField.mouseEnabled = true;
			//this.objLoader.load(new URLRequest(this.objData.title));
			//trace(titleField.text);
			
			/* addEventListener("itemMove", handleItemMove,false,0,true); */
			
		}
		
		/* private function get {
			
		} */
		
		/* function handleItemMove(e:Event):void {
			trace("e:target: " + e.target);
			tasuku.savePosition(e.target.x,e.target.y,e.target.itemData.id);
		
		} */
		
		
		
	}
}